export let constRoutes = [
    {
        path: "/login",
        component: () => import("@/views/Login/index.vue"),
        name: "login",
        meta: {
            title: "登录",
            hidden: true,
            icon: ''
        }
    }, {
        path: "/",
        component: () => import("@/views/Layout/index.vue"),
        name: "layout",
        redirect: "/home",
        meta: {
            title: "layout",
            hidden: false,
            root: true,
            icon: 'HomeFilled'
        },
        children: [{
            name: "Home",
            path: "/home",
            component: () => import("@/views/Home/index.vue"),
            meta: {
                title: "首页",
                hidden: false,
                icon: 'HomeFilled'
            }
        }]
    },{
        name: "Screen",
        path: "/screen",
        component: () => import("@/views/Screen/index.vue"),
        meta: {
            title: "数据大屏",
            hidden: false,
            icon: 'Platform'
        }
    }, {
        path: "/404",
        name: "404",
        redirect: "/404",
        meta: {
            title: "404",
            hidden: true,
        }
    }
]


export const asyncRoute = [{
    name: "Acl",
    path: "/acl",
    redirect:'/acl/role',
    component: () => import("@/views/Layout/index.vue"),
    meta: {
        title: "权限管理",
        hidden: false,
        icon: 'Lock'
    },
    children: [{
        name: "Role",
        path: "/acl/role",
        component: () => import("@/views/Role/index.vue"),
        meta: {
            title: "角色管理",
            hidden: false,
            icon: 'UserFilled'
        }
    }, {
        name: "Permission",
        path: "/acl/permission",
        component: () => import("@/views/Permission/index.vue"),
        meta: {
            title: "菜单管理",
            hidden: false,
            icon: 'Grid'
        }
    }, {
        name: "User",
        path: "/acl/user",
        component: () => import("@/views/User/index.vue"),
        meta: {
            title: "用户管理",
            hidden: false,
            icon: 'User'
        }
    }],
}, {
    name: "Product",
    path: "/product",
    redirect: "/product/attr",
    component: () => import("@/views/Layout/index.vue"),
    meta: {
        title: "产品管理",
        hidden: false,
        icon: 'Goods'
    },
    children: [{
        name: "Attr",
        path: "/product/attr",
        component: () => import("@/views/Product/Attr/index.vue"),
        meta: {
            title: "属性管理",
            hidden: false,
            icon: 'Memo'
        }
    }, {
        name: "SKU",
        path: "/product/sku",
        component: () => import("@/views/Product/SKU/index.vue"),
        meta: {
            title: "SKU管理",
            hidden: false,
            icon: 'Present'
        }
    }, {
        name: "SPU",
        path: "/product/spu",
        component: () => import("@/views/Product/SPU/index.vue"),
        meta: {
            title: "SPU管理",
            hidden: false,
            icon: 'ChromeFilled'
        }
    }, {
        name: "Trademark",
        path: "/product/trademark",
        component: () => import("@/views/Product/Trademark/index.vue"),
        meta: {
            title: "品牌管理",
            hidden: false,
            icon: 'ShoppingCartFull'
        }
    }]
}]


export const anyRoute = [{
    path: "/:pathMatch(.*)*",
    name: "other",
    redirect: "/404",
    meta: {
        title: "任意页",
        hidden: true,
    }
}]